import { createStore, applyMiddleware, combineReducers } from 'redux';
import countReducer from './reducers/count';
import personReducer from './reducers/person';
import thunk from 'redux-thunk';

// 汇总reducers
const allReducer = combineReducers({
    he: countReducer,
    rens: personReducer
});

// 如果需要让store支持异步action则必须添加参数applyMiddleware(thunk)
export default createStore(allReducer, applyMiddleware(thunk));
